package com.bci.pwtz.service;

import java.util.List;

import com.bci.pwtz.common.util.PaginationList;
import com.bci.pwtz.exception.CanNotDeleteException;
import com.bci.pwtz.exception.PwtzDatabaseException;
import com.bci.pwtz.mysql.model.Zsbyq;

/**
 * 柱上变压器服务 <br/>
 * <p>Description:<br/>
 *    <p>TODO 详细描述
 *
 * <p>For Examples <br/>
 * <PRE>
 * </PRE>
 * <p>
 */
public interface ZsbyqService
{
    /**
     * 
     * 新增柱上变压器 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2014-9-16-下午2:56:16<br/>
     * <p>
     * @param zsbyq
     * @return
     * @throws PwtzDatabaseException   
     *
     */
    Zsbyq add(Zsbyq zsbyq) throws PwtzDatabaseException;
    
    /**
     * 
     * 根据变压器ID获取柱上变压器信息 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2014-9-16-下午2:56:11<br/>
     * <p>
     * @param zsbyqId
     * @return
     * @throws PwtzDatabaseException   
     *
     */
    Zsbyq load(String zsbyqId) throws PwtzDatabaseException;
    
    /**
     * 
     * 删除柱上变压器 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2014-9-16-下午2:56:22<br/>
     * <p>
     * @param zsbyqId
     * @return
     * @throws PwtzDatabaseException   
     * @throws CanNotDeleteException 
     *
     */
    int delete(String zsbyqId) throws PwtzDatabaseException, CanNotDeleteException;
    
    /**
     * 
     * 修改柱上变压器 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2014-9-16-下午2:56:26<br/>
     * <p>
     * @param zsbyq
     * @return   
     * @throws PwtzDatabaseException 
     *
     */
    int update(Zsbyq zsbyq) throws PwtzDatabaseException;
    
    /**
     * 一句话描述 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2014-9-17-下午3:48:13<br/>
     * <p>
     * @param devicename
     * @param companyid
     * @param portalType
     * @param beginTime
     * @param endTime
     * @param pageSize
     * @param pageNo
     * @return
     * @throws PwtzDatabaseException   
     *
     */
    public PaginationList<Zsbyq> findZsbyq(String devicename,Long companyid,int portalType, String[] medLineCodes,String beginTime, String endTime, int pageSize, int pageNo) throws PwtzDatabaseException;
    
    List<Zsbyq> selectZsbyqList(String devicename,Long companyid,int portalType, String[] medLineCodes,String beginTime, String endTime) throws PwtzDatabaseException;
    
    PaginationList<Zsbyq> selectDeviceList(String towercode,String devicename,Long companyid,int pagesize,int pageno)throws PwtzDatabaseException;

    public int updateLastSyncDevice(Long companyId,String lastSyncTime) throws PwtzDatabaseException;
}
